Problem: Is the function given below continuous/differentiable at $x=2$ ? $f(x)=\begin{cases} -x^2+3&,&x\leq2 \\\\ (x-4)^2-5&,&x>2 \end{cases}$ Choose 1 answer: Choose 1 answer: (Choice A) A Continuous but not differentiable (Choice B) B Differentiable but not continuous (Choice C) C Both continuous and differentiable (Choice D) D Neither continuous nor differentiable
Answer: Checking for continuity at $x=2$ For the function to be continuous at $x=2$, we need the two-sided limit $\lim_{x\to 2}f(x)$ to exist and be equal to $f(2)$. This is the same as requiring that the two one-sided limits $\lim_{x\to 2^-}f(x)$ and $\lim_{x\to 2^+}f(x)$ exist and are equal to $f(2)$. According to $f$ 's definition, $f(2)=-(2)^2+3=-1$. $\lim_{x\to 2^-}f(x)$ $-x^2+3$ evaluated at $x=2$ is equal to $-1$. Since $-x^2+3$ is continuous, we can be certain that $\lim_{x\to 2^-}f(x)=-1$. $\lim_{x\to 2^+}f(x)$ $(x-4)^2-5$ evaluated at $x=2$ is equal to $-1$. Since $(x-4)^2-5$ is continuous, we can be certain that $\lim_{x\to 2^+}f(x)=-1$. We saw that the two one-sided limits exist and are equal to $f(2)$, so the function is continuous at $x=2$. Checking for differentiability at $x=2$ For the function to be differentiable at $x=2$, we need the two-sided limit $\lim_{x\to 2}\dfrac{f(x)-f(2)}{x-2}=\,\lim_{x\to 2}\dfrac{f(x)-(-1)}{x-2}$ to exist. This is the same as requiring that the two one-sided limits $\lim_{x\to 2^-}\dfrac{f(x)-(-1)}{x-2}$ and $\lim_{x\to 2^+}\dfrac{f(x)-(-1)}{x-2}$ exist and have the same value. $\lim_{x\to 2^-}\dfrac{f(x)-(-1)}{x-2}=-4$ $\lim_{x\to 2^+}\dfrac{f(x)-(-1)}{x-2}=-4$ We saw that the two one-sided limits exist and are equal, so the function is differentiable at $x=2$. In conclusion, the function is both continuous and differentiable at $x=2$.